package org.tinaelle.client.gui.grid;

import com.gwtext.client.data.Store;
import com.gwtextux.client.widgets.form.MultiSelect;

public class DataUserDetail<T> extends DataDetail<T> {
	public DataUserDetail(final Store store, final DynaTableDataProvider<T> dataProvider,
	        final DataDetailItf dataDetailItf) {
		super( store, dataProvider, dataDetailItf );

		final MultiSelect multiSelect = new MultiSelect();
		multiSelect.setName( "Groups" );
		multiSelect.setDataFields( new String[] { "adGroupId", "name" } );
		multiSelect.setData( new Object[][] {
		        new Object[] { "1", "One" },
		        new Object[] { "2", "Two" },
		        new Object[] { "3", "Three" },
		        new Object[] { "4", "Four" },
		        new Object[] { "5", "Five" },
		        new Object[] { "6", "Six" },
		        new Object[] { "7", "Seven" },
		        new Object[] { "8", "Eight" },
		        new Object[] { "9", "Nine" } } );
		multiSelect.setValueField( "adGroupId" );
		multiSelect.setDisplayField( "name" );
		multiSelect.setWidth( 160 );
		multiSelect.setHeight( 180 );
		multiSelect.setAllowBlank( true );
		multiSelect.setLegend( "Groups" );
		multiSelect.setFieldLabel( "Groups" );
		formPanel.add( multiSelect );
	}
}
